package demo2;
/*
数组越界异常：ArrayIndexOutOfBoundsException
原因：编号写错了
 */
public class ArrayTest4 {
    public static void main(String[] args) {
        int[] array = new int[3];
        array[0] = 3;
        array[1] = 1;
        array[2] = 2;
        array[3] = 4;
        System.out.println(array[0]);
        System.out.println(array[1]);
        System.out.println(array[2]);
        System.out.println(array[3]);
    }
}
